package com.example.demo.service;

import com.example.demo.mapper.StudentMapper;
import com.example.demo.model.Student;
import com.mybatisflex.solon.service.impl.ServiceImpl;
import org.apache.ibatis.solon.annotation.Db;
import org.noear.solon.annotation.Component;
import org.noear.solon.annotation.Inject;

import java.io.Serializable;

/**
 * 学生业务层实现类
 *
 * @author raos
 * @date 2024-12-14
 */
@Component
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {

    @Override
    public Student findById(Serializable userId) {
        if (userId == null) {
            return null;
        }
        return mapper.selectOneById(userId);
    }

}
